Skip to content

#28 feat: Copy export to clipboard#45

Open
ikorich wants to merge 2 commits intodevelopfrom
feature/28-copy-to-clipboard
Open

#28 feat: Copy export to clipboard#45
ikorich wants to merge 2 commits intodevelopfrom
feature/28-copy-to-clipboard

Conversation

@ikorich
Copy link
Member

@ikorich ikorich commented Jan 31, 2026

Motivation

Users frequently share code comparisons on Slack, docs, and other apps. Currently they must export to disk first, then open the file to copy. This PR adds direct clipboard copy for faster workflow.

Changes

  • Add .copied case to ExportResult enum for clipboard-specific feedback
  • Add copyToClipboard() async function in ContentView using NSPasteboard
  • Add Copy button (doc.on.clipboard icon) next to Export button in ToolBarView
  • Update ToastView to display "Copied to clipboard" with appropriate icon

Test plan

  • Click Copy button → image copies to clipboard
  • Paste in Slack/Notes/etc → image appears correctly
  • Toast shows "Copied to clipboard" with clipboard icon
  • Copy button disabled when panels are empty
  • Build succeeds with no warnings

Closes #28

Adds a Copy button next to the Export button that copies the rendered
comparison image directly to the system clipboard for easy pasting
into Slack, documentation, etc.

Changes:
- Add .copied case to ExportResult for clipboard feedback
- Add copyToClipboard() function using NSPasteboard
- Add Copy button in ToolBarView with doc.on.clipboard icon
- Update ToastView to show "Copied to clipboard" message
@ikorich ikorich changed the base branch from master to develop January 31, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Copy export to clipboard

1 participant